/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.edu.flf.audioteca.applcontroller;

import br.edu.flf.audioteca.businessdelegate.IAlbumBusinessDelegate;
import br.edu.flf.audioteca.viewhelper.cadastros.ArtistaViewHelper;
import br.edu.flf.audioteca.businessdelegate.IArtistaBusinessDelegate;
import br.edu.flf.audioteca.businessdelegate.impl.AlbumBusinessDelegate;
import br.edu.flf.audioteca.businessdelegate.impl.ArtistaBusinessDelegate;
import br.edu.flf.audioteca.commandcontrol.ComandosDeControle;
import br.edu.flf.audioteca.viewhelper.cadastros.AlbumViewHelper;
import br.edu.flf.audioteca.viewhelper.cadastros.CadastrosViewHelper;

/**
 *
 * @author Nathan Azevedo
 */
public class CadastroAppController {

    private IArtistaBusinessDelegate artistaBusinessDelegate = null;
    private IAlbumBusinessDelegate albumBusinessDelegate = null;
    private ArtistaViewHelper artistaViewHelper = null;
    private CadastrosViewHelper cadastrosViewHelper = null;
    private AlbumViewHelper albumViewHelper = null;

    public CadastroAppController() {

        artistaViewHelper = ArtistaViewHelper.getInstance();
        albumViewHelper = AlbumViewHelper.getInstance();
    }

    public String limparCampos() {
        return ComandosDeControle.MOSTRAR_CADASTRO_ARTISTA;
    }

    public String mostrarCadastroDeArtistas() {
        return ComandosDeControle.MOSTRAR_CADASTRO_ARTISTA;
    }

    public String mostrarResultadoCadastroArtista() {
        return ComandosDeControle.MOSTRAR_RESULTADOS_CADASTRO_ARTISTA;
    }

    public String mostrarCadastroDeAlbums() {
        return ComandosDeControle.MOSTRAR_CADASTRO_DE_ALBUMS;
    }

    public String cadastrarArtista() {

        artistaBusinessDelegate = ArtistaBusinessDelegate.getInstance();
        return artistaBusinessDelegate.cadastrarArtista(this.artistaViewHelper.getArtista());

    }

    public String cadastrarAlbum() {
        albumBusinessDelegate = AlbumBusinessDelegate.getInstance();
        return albumBusinessDelegate.gravarAlbum(albumViewHelper.getAlbum());
    }

    public ArtistaViewHelper getArtistaViewHelper() {
        return artistaViewHelper;
    }

    public void setArtistaViewHelper(ArtistaViewHelper artistaViewHelper) {
        this.artistaViewHelper = artistaViewHelper;
    }

    public CadastrosViewHelper getCadastrosViewHelper() {
        return CadastrosViewHelper.getCadastroInicialViewHelper();
    }

    public void setCadastrosViewHelper(CadastrosViewHelper cadastrosViewHelper) {
        this.cadastrosViewHelper = cadastrosViewHelper;
    }

    public AlbumViewHelper getAlbumViewHelper() {
        return albumViewHelper;
    }

    public void setAlbumViewHelper(AlbumViewHelper albumViewHelper) {
        this.albumViewHelper = albumViewHelper;
    }
}
